package com.changgou.backend.config;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

@Component
public class MvcConfig {
    @Bean
    public CommonsMultipartResolver commonsMultipartResolver(){

        CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
        multipartResolver.setResolveLazily(true);
        multipartResolver.setMaxUploadSize(524288);


        return multipartResolver ;
    }
}
